package com.bjsxt.controller;

import com.bjsxt.commons.pojo.BaizhanResult;
import com.bjsxt.service.DetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.PriorityQueue;

/**
 * @author coder_z
 * @date 2023/3/20
 **/
@RestController
public class DetailController {
    @Autowired
    private DetailService detailService;

    /**
     * 商品详情接口
     * @param id
     * @return
     */
    @RequestMapping({"/item/selectItemInfo"})
    public BaizhanResult showItem(long id){

        return detailService.showItem(id);
    }

    /**
     * 显示商品描述
     * @param itemId
     * @return
     */
    @RequestMapping("/item/selectItemDescByItemId")
    public BaizhanResult showItemDesc(long itemId){
        return detailService.showItemDesc(itemId);
    }

    /**
     * 显示商品规格参数信息
     * @param itemId
     * @return
     */
    @RequestMapping("/item/selectTbItemParamItemByItemId")
    public BaizhanResult showItemParamItem(long itemId){
        return detailService.showItemParamItem(itemId);
    }

}
